# /usr/bin/python3
# -*- coding: utf-8 -*-
# @Time    : 2022/1/11 9:53
# @Author  : lt
# @Email   : lt@163.com
# @File    : home_page.py
# @Software: PyCharm
from selenium.webdriver.common.by import By
from page.KHGL_page.Base_Page import BasePage
class HomePage(BasePage):
    # 定位线索按钮
    xiansuo_locator = (By.LINK_TEXT, '线索')
    #定位客户控件按钮
    kehu_locator = (By.LINK_TEXT,'客户')
    # 定位商机按钮
    shangji_locator = (By.CSS_SELECTOR,'body > div.navbar.navbar-inverse.navbar-fixed-top > div > div > div.nav-collapse.collapse > ul:nth-child(1) > li:nth-child(3) > a')
    #定位合同按钮
    ht_button_locator = (By.LINK_TEXT, '合同')
    #点击线索按钮
    def xs_click(self):
        self.driver.find_element(*self.xiansuo_locator).click()
    #点击客户按钮
    def kh_click(self):
        self.driver.find_element(*self.kehu_locator).click()
    #点击商机安琥
    def sj_click(self):
        self.driver.find_element(*self.shangji_locator).click()
    #点击合同按钮
    def ht_click(self):
        self.driver.find_element(*self.ht_button_locator).click()